/*************************************************
Author: lijunfeng
Date: 2013-04-25
Description: custom defined av file format
**************************************************/
#ifndef _TMFILE_INTERFACE
#define _TMFILE_INTERFACE 
enum
{
	TMF_CODEC_ID_YUV420P,
	TMF_CODEC_ID_YUYV422,		
	TMF_CODEC_ID_YUV420SP,
	TMF_CODEC_ID_RGB24,
	TMF_CODEC_ID_H264,
	TMF_CODEC_ID_H263,
	TMF_CODEC_ID_TIVC,
	TMF_CODEC_ID_PCM_S16LE=100,
	TMF_CODEC_ID_AAC,
};
enum {
    TMF_FLAG_HASVIDEO = 1,
    TMF_FLAG_HASAUDIO = 4,
};
#pragma pack(push)
#pragma pack(1)
//video codec info
typedef struct tmf_vcodec_info
{
	int codec_id;
	int width;
	int height;
	int bit_rate;
	int frame_rate;
	int has_b_frames;
    unsigned char *extradata;
    int extradata_size;
}tmf_vcodec_info;
//audio codec info
typedef struct tmf_acodec_info
{
	int codec_id;
	int sample_rate;
	int channels;
	int bits_per_coded_sample;
    unsigned char *extradata;
    int extradata_size;
}tmf_acodec_info;

enum 
{
	tmfVideoFrame=0,
	tmfAudioFrame,
};
//frame info
typedef struct tmf_frame_info
{
	int type;
	int size;
	int key_frame;
	int64_t pts;
	int64_t dts;
}tmf_frame_info;
#pragma pack(pop)
#endif
